﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;

// Token: 0x0200000C RID: 12
[AddComponentMenu("Dynamic Bone/Dynamic Bone Ver02")]
public class DynamicBone_Ver02 : MonoBehaviour
{
	// Token: 0x0600003B RID: 59 RVA: 0x000051AC File Offset: 0x000033AC
	public virtual void Awake()
	{
		this.InitNodeParticle();
		this.SetupParticles();
		this.InitLocalPosition();
		if (this.IsRefTransform())
		{
			this.setPtn(0, true);
		}
		this.InitTransforms();
	}

	// Token: 0x0600003C RID: 60 RVA: 0x000051DC File Offset: 0x000033DC
	public virtual void Update()
	{
	}

	// Token: 0x0600003D RID: 61 RVA: 0x000051E0 File Offset: 0x000033E0
	public virtual void LateUpdate()
	{
		if (this.Weight > 0f)
		{
			this.InitTransforms();
			this.UpdateDynamicBones(Time.deltaTime);
		}
	}

	// Token: 0x0600003E RID: 62 RVA: 0x00005204 File Offset: 0x00003404
	public virtual void OnEnable()
	{
		this.ResetParticlesPosition();
		if (this.Root != null)
		{
			this.ObjectPrevPosition = this.Root.position;
		}
		else
		{
			this.ObjectPrevPosition = base.transform.position;
		}
	}

	// Token: 0x0600003F RID: 63 RVA: 0x00005244 File Offset: 0x00003444
	public virtual void OnDisable()
	{
		this.InitTransforms();
	}

	// Token: 0x06000040 RID: 64 RVA: 0x0000524C File Offset: 0x0000344C
	public virtual void OnValidate()
	{
		this.UpdateRate = Mathf.Max(this.UpdateRate, 0f);
		if (Application.isEditor)
		{
			this.InitNodeParticle();
			this.SetupParticles();
			this.InitLocalPosition();
			if (this.IsRefTransform())
			{
				this.setPtn(this.PtnNo, true);
			}
			this.InitTransforms();
		}
	}

	// Token: 0x06000041 RID: 65 RVA: 0x000052AC File Offset: 0x000034AC
	public virtual void OnDrawGizmosSelected()
	{
		if (!base.enabled || this.Root == null)
		{
			return;
		}
		if (Application.isEditor && !Application.isPlaying && base.transform.hasChanged)
		{
			this.InitNodeParticle();
			this.SetupParticles();
			this.InitLocalPosition();
			if (this.IsRefTransform())
			{
				this.setPtn(this.PtnNo, true);
			}
			this.InitTransforms();
		}
		Gizmos.color = Color.white;
		foreach (global::DynamicBone_Ver02.Particle particle in this.Particles)
		{
			if (particle.ParentIndex >= 0)
			{
				global::DynamicBone_Ver02.Particle particle2 = this.Particles[particle.ParentIndex];
				Gizmos.DrawLine(particle.Position, particle2.Position);
			}
			if (particle.Radius > 0f)
			{
				Gizmos.DrawWireSphere(particle.Position, particle.Radius * this.ObjectScale);
			}
		}
	}

	// Token: 0x06000042 RID: 66 RVA: 0x000053D4 File Offset: 0x000035D4
	public virtual void SetWeight(float _weight)
	{
		if (this.Weight != _weight)
		{
			if (_weight == 0f)
			{
				this.InitTransforms();
			}
			else if (this.Weight == 0f)
			{
				this.ResetParticlesPosition();
				if (this.Root != null)
				{
					this.ObjectPrevPosition = this.Root.position;
				}
				else
				{
					this.ObjectPrevPosition = base.transform.position;
				}
			}
			this.Weight = _weight;
		}
	}

	// Token: 0x06000043 RID: 67 RVA: 0x00005458 File Offset: 0x00003658
	public virtual float GetWeight()
	{
		return this.Weight;
	}

	// Token: 0x06000044 RID: 68 RVA: 0x00005460 File Offset: 0x00003660
	public virtual void setRoot(Transform _transRoot)
	{
		this.Root = _transRoot;
	}

	// Token: 0x06000045 RID: 69 RVA: 0x0000546C File Offset: 0x0000366C
	public virtual global::DynamicBone_Ver02.Particle getParticle(int _idx)
	{
		if (this.Particles.Count >= _idx)
		{
			return null;
		}
		return this.Particles[_idx];
	}

	// Token: 0x06000046 RID: 70 RVA: 0x00005490 File Offset: 0x00003690
	public virtual int getParticleCount()
	{
		return this.Particles.Count;
	}

	// Token: 0x06000047 RID: 71 RVA: 0x000054A0 File Offset: 0x000036A0
	public virtual bool setPtn(int _ptn, bool _isSameForcePtn = false)
	{
		if (this.Particles == null || this.Patterns == null)
		{
			return false;
		}
		if (this.Particles.Count == 0 || this.Patterns.Count == 0)
		{
			return false;
		}
		if (this.Patterns.Count <= _ptn)
		{
			return false;
		}
		if (this.Particles.Count != this.Patterns[_ptn].ParticlePtns.Count)
		{
			return false;
		}
		if (this.PtnNo == _ptn && !_isSameForcePtn)
		{
			return false;
		}
		this.PtnNo = _ptn;
		this.Gravity = this.Patterns[_ptn].Gravity;
		for (int i = 0; i < this.Particles.Count; i++)
		{
			global::DynamicBone_Ver02.Particle particle = this.Particles[i];
			global::DynamicBone_Ver02.ParticlePtn particlePtn = this.Patterns[_ptn].ParticlePtns[i];
			particle.IsRotationCalc = particlePtn.IsRotationCalc;
			particle.Damping = particlePtn.Damping;
			particle.Elasticity = particlePtn.Elasticity;
			particle.Stiffness = particlePtn.Stiffness;
			particle.Inert = particlePtn.Inert;
			particle.ScaleNextBoneLength = particlePtn.ScaleNextBoneLength;
			particle.Radius = particlePtn.Radius;
			particle.IsMoveLimit = particlePtn.IsMoveLimit;
			particle.MoveLimitMin = particlePtn.MoveLimitMin;
			particle.MoveLimitMax = particlePtn.MoveLimitMax;
			particle.KeepLengthLimitMin = particlePtn.KeepLengthLimitMin;
			particle.KeepLengthLimitMax = particlePtn.KeepLengthLimitMax;
			particle.IsCrush = particlePtn.IsCrush;
			particle.CrushMoveAreaMin = particlePtn.CrushMoveAreaMin;
			particle.CrushMoveAreaMax = particlePtn.CrushMoveAreaMax;
			particle.CrushAddXYMin = particlePtn.CrushAddXYMin;
			particle.CrushAddXYMax = particlePtn.CrushAddXYMax;
			particle.Damping = Mathf.Clamp01(particle.Damping);
			particle.Elasticity = Mathf.Clamp01(particle.Elasticity);
			particle.Stiffness = Mathf.Clamp01(particle.Stiffness);
			particle.Inert = Mathf.Clamp01(particle.Inert);
			particle.ScaleNextBoneLength = Mathf.Max(particle.ScaleNextBoneLength, 0f);
			particle.Radius = Mathf.Max(particle.Radius, 0f);
			particle.InitLocalPosition = particlePtn.InitLocalPosition;
			particle.InitLocalRotation = particlePtn.InitLocalRotation;
			particle.InitLocalScale = particlePtn.InitLocalScale;
			particle.refTrans = particlePtn.refTrans;
			particle.LocalPosition = particlePtn.LocalPosition;
			particle.EndOffset = particlePtn.EndOffset;
		}
		return true;
	}

	// Token: 0x06000048 RID: 72 RVA: 0x0000571C File Offset: 0x0000391C
	public virtual void ResetParticlesPosition()
	{
		if (this.Root != null)
		{
			this.ObjectPrevPosition = this.Root.position;
		}
		else
		{
			this.ObjectPrevPosition = base.transform.position;
		}
		foreach (global::DynamicBone_Ver02.Particle particle in this.Particles)
		{
			if (particle.Transform != null)
			{
				particle.Position = (particle.PrevPosition = particle.Transform.position);
			}
			else
			{
				Transform transform = this.Particles[particle.ParentIndex].Transform;
				particle.Position = (particle.PrevPosition = transform.TransformPoint(particle.EndOffset));
			}
		}
	}

	// Token: 0x06000049 RID: 73 RVA: 0x0000580C File Offset: 0x00003A0C
	public virtual void InitLocalPosition()
	{
		List<global::DynamicBone_Ver02.TransformParam> list = new List<global::DynamicBone_Ver02.TransformParam>();
		for (int i = 0; i < this.Particles.Count; i++)
		{
			global::DynamicBone_Ver02.Particle particle = this.Particles[i];
			global::DynamicBone_Ver02.TransformParam transformParam = new global::DynamicBone_Ver02.TransformParam();
			if (particle.Transform == null)
			{
				list.Add(transformParam);
			}
			else
			{
				transformParam.pos = particle.Transform.localPosition;
				transformParam.rot = particle.Transform.localRotation;
				transformParam.scale = particle.Transform.localScale;
				list.Add(transformParam);
			}
		}
		for (int j = 0; j < this.Patterns.Count; j++)
		{
			global::DynamicBone_Ver02.BonePtn bonePtn = this.Patterns[j];
			for (int k = 0; k < bonePtn.Params.Count; k++)
			{
				bonePtn.ParticlePtns[k].InitLocalPosition = bonePtn.Params[k].RefTransform.localPosition;
				bonePtn.ParticlePtns[k].InitLocalRotation = bonePtn.Params[k].RefTransform.localRotation;
				bonePtn.ParticlePtns[k].InitLocalScale = bonePtn.Params[k].RefTransform.localScale;
				bonePtn.ParticlePtns[k].refTrans = bonePtn.Params[k].RefTransform;
			}
			if (bonePtn.ParticlePtns.Count == this.Particles.Count)
			{
				for (int l = 0; l < this.Particles.Count; l++)
				{
					global::DynamicBone_Ver02.Particle particle2 = this.Particles[l];
					if (!(particle2.Transform == null))
					{
						particle2.Transform.localPosition = bonePtn.ParticlePtns[l].InitLocalPosition;
						particle2.Transform.localRotation = bonePtn.ParticlePtns[l].InitLocalRotation;
						particle2.Transform.localScale = bonePtn.ParticlePtns[l].InitLocalScale;
					}
				}
			}
			for (int m = 1; m < bonePtn.Params.Count; m++)
			{
				if (bonePtn.Params[m].RefTransform && bonePtn.Params[m - 1].RefTransform)
				{
					bonePtn.ParticlePtns[m].LocalPosition = this.CalcLocalPosition(bonePtn.Params[m].RefTransform.position, bonePtn.Params[m - 1].RefTransform);
				}
			}
		}
		for (int n = 0; n < this.Particles.Count; n++)
		{
			global::DynamicBone_Ver02.Particle particle3 = this.Particles[n];
			if (!(particle3.Transform == null))
			{
				particle3.Transform.localPosition = list[n].pos;
				particle3.Transform.localRotation = list[n].rot;
				particle3.Transform.localScale = list[n].scale;
			}
		}
	}

	// Token: 0x0600004A RID: 74 RVA: 0x00005B90 File Offset: 0x00003D90
	public virtual void ResetPosition()
	{
		this.InitLocalPosition();
		this.setPtn(this.PtnNo, true);
		if (base.enabled)
		{
			this.InitTransforms();
		}
	}

	// Token: 0x0600004B RID: 75 RVA: 0x00005BB8 File Offset: 0x00003DB8
	public virtual bool PtnBlend(int _blendAnswerPtn, int _blendPtn1, int _blendPtn2, float _t)
	{
		if (this.Patterns == null)
		{
			return false;
		}
		int count = this.Patterns.Count;
		if (count <= _blendAnswerPtn || count <= _blendPtn1 || count <= _blendPtn2)
		{
			return false;
		}
		if (this.Patterns[_blendAnswerPtn].ParticlePtns.Count != this.Patterns[_blendPtn1].ParticlePtns.Count || this.Patterns[_blendPtn2].ParticlePtns.Count != this.Patterns[_blendPtn1].ParticlePtns.Count)
		{
			return false;
		}
		this.Patterns[_blendAnswerPtn].Gravity = Vector3.Lerp(this.Patterns[_blendPtn1].Gravity, this.Patterns[_blendPtn2].Gravity, _t);
		for (int i = 0; i < this.Patterns[_blendAnswerPtn].ParticlePtns.Count; i++)
		{
			global::DynamicBone_Ver02.ParticlePtn particlePtn = this.Patterns[_blendAnswerPtn].ParticlePtns[i];
			global::DynamicBone_Ver02.ParticlePtn particlePtn2 = this.Patterns[_blendPtn1].ParticlePtns[i];
			global::DynamicBone_Ver02.ParticlePtn particlePtn3 = this.Patterns[_blendPtn2].ParticlePtns[i];
			particlePtn.IsRotationCalc = particlePtn3.IsRotationCalc;
			particlePtn.Damping = Mathf.Lerp(particlePtn2.Damping, particlePtn3.Damping, _t);
			particlePtn.Elasticity = Mathf.Lerp(particlePtn2.Elasticity, particlePtn3.Elasticity, _t);
			particlePtn.Stiffness = Mathf.Lerp(particlePtn2.Stiffness, particlePtn3.Stiffness, _t);
			particlePtn.Inert = Mathf.Lerp(particlePtn2.Inert, particlePtn3.Inert, _t);
			particlePtn.ScaleNextBoneLength = Mathf.Lerp(particlePtn2.ScaleNextBoneLength, particlePtn3.ScaleNextBoneLength, _t);
			particlePtn.Radius = Mathf.Lerp(particlePtn2.Radius, particlePtn3.Radius, _t);
			particlePtn.IsMoveLimit = particlePtn3.IsMoveLimit;
			particlePtn.MoveLimitMin = Vector3.Lerp(particlePtn2.MoveLimitMin, particlePtn3.MoveLimitMin, _t);
			particlePtn.MoveLimitMax = Vector3.Lerp(particlePtn2.MoveLimitMax, particlePtn3.MoveLimitMax, _t);
			particlePtn.KeepLengthLimitMin = Mathf.Lerp(particlePtn2.KeepLengthLimitMin, particlePtn3.KeepLengthLimitMin, _t);
			particlePtn.KeepLengthLimitMax = Mathf.Lerp(particlePtn2.KeepLengthLimitMax, particlePtn3.KeepLengthLimitMax, _t);
			particlePtn.IsCrush = particlePtn3.IsCrush;
			particlePtn.CrushMoveAreaMin = Mathf.Lerp(particlePtn2.CrushMoveAreaMin, particlePtn3.CrushMoveAreaMin, _t);
			particlePtn.CrushMoveAreaMax = Mathf.Lerp(particlePtn2.CrushMoveAreaMax, particlePtn3.CrushMoveAreaMax, _t);
			particlePtn.CrushAddXYMin = Mathf.Lerp(particlePtn2.CrushAddXYMin, particlePtn3.CrushAddXYMin, _t);
			particlePtn.CrushAddXYMax = Mathf.Lerp(particlePtn2.CrushAddXYMax, particlePtn3.CrushAddXYMax, _t);
			particlePtn.Damping = Mathf.Clamp01(particlePtn.Damping);
			particlePtn.Elasticity = Mathf.Clamp01(particlePtn.Elasticity);
			particlePtn.Stiffness = Mathf.Clamp01(particlePtn.Stiffness);
			particlePtn.Inert = Mathf.Clamp01(particlePtn.Inert);
			particlePtn.ScaleNextBoneLength = Mathf.Max(particlePtn.ScaleNextBoneLength, 0f);
			particlePtn.Radius = Mathf.Max(particlePtn.Radius, 0f);
			particlePtn.InitLocalPosition = Vector3.Lerp(particlePtn2.InitLocalPosition, particlePtn3.InitLocalPosition, _t);
			particlePtn.InitLocalRotation = Quaternion.Lerp(particlePtn2.InitLocalRotation, particlePtn3.InitLocalRotation, _t);
			particlePtn.InitLocalScale = Vector3.Lerp(particlePtn2.InitLocalScale, particlePtn3.InitLocalScale, _t);
			particlePtn.refTrans = particlePtn3.refTrans;
			particlePtn.LocalPosition = Vector3.Lerp(particlePtn2.LocalPosition, particlePtn3.LocalPosition, _t);
			particlePtn.EndOffset = Vector3.Lerp(particlePtn2.EndOffset, particlePtn3.EndOffset, _t);
		}
		return true;
	}

	// Token: 0x0600004C RID: 76 RVA: 0x00005F98 File Offset: 0x00004198
	public virtual bool setGravity(int _ptn, Vector3 _gravity, bool _isNowGravity = true)
	{
		if (this.Particles == null || this.Patterns == null)
		{
			return false;
		}
		if (this.Particles.Count == 0 || this.Patterns.Count == 0)
		{
			return false;
		}
		if (this.Patterns.Count <= _ptn)
		{
			return false;
		}
		if (_isNowGravity)
		{
			this.Gravity = _gravity;
		}
		if (_ptn < 0)
		{
			for (int i = 0; i < this.Patterns.Count; i++)
			{
				this.Patterns[i].Gravity = _gravity;
			}
		}
		else
		{
			if (this.Patterns.Count <= _ptn)
			{
				return false;
			}
			this.Patterns[_ptn].Gravity = _gravity;
		}
		return true;
	}

	// Token: 0x0600004D RID: 77 RVA: 0x00006064 File Offset: 0x00004264
	public virtual bool setSoftParams(int _ptn, int _bone, float _damping, float _elasticity, float _stiffness, bool _isNowParam = true)
	{
		if (this.Particles == null || this.Patterns == null)
		{
			return false;
		}
		if (this.Particles.Count == 0 || this.Patterns.Count == 0)
		{
			return false;
		}
		if (this.Patterns.Count <= _ptn)
		{
			return false;
		}
		if (_isNowParam)
		{
			if (_bone == -1)
			{
				for (int i = 0; i < this.Particles.Count; i++)
				{
					this.Particles[i].Damping = _damping;
					this.Particles[i].Elasticity = _elasticity;
					this.Particles[i].Stiffness = _stiffness;
				}
			}
			else if (this.Particles.Count > _bone)
			{
				this.Particles[_bone].Damping = _damping;
				this.Particles[_bone].Elasticity = _elasticity;
				this.Particles[_bone].Stiffness = _stiffness;
			}
		}
		if (_ptn < 0)
		{
			for (int j = 0; j < this.Patterns.Count; j++)
			{
				if (_bone == -1)
				{
					for (int k = 0; k < this.Patterns.Count; k++)
					{
						this.setSoftParams(this.Patterns[j].ParticlePtns[k], _damping, _elasticity, _stiffness);
					}
				}
				else if (this.Particles.Count > _bone)
				{
					this.setSoftParams(this.Patterns[j].ParticlePtns[_bone], _damping, _elasticity, _stiffness);
				}
			}
		}
		else
		{
			if (this.Patterns.Count <= _ptn)
			{
				return false;
			}
			if (_bone == -1)
			{
				for (int l = 0; l < this.Patterns.Count; l++)
				{
					this.setSoftParams(this.Patterns[_ptn].ParticlePtns[l], _damping, _elasticity, _stiffness);
				}
			}
			else if (this.Particles.Count > _bone)
			{
				this.setSoftParams(this.Patterns[_ptn].ParticlePtns[_bone], _damping, _elasticity, _stiffness);
			}
		}
		return true;
	}

	// Token: 0x0600004E RID: 78 RVA: 0x000062B0 File Offset: 0x000044B0
	public virtual bool setSoftParams(global::DynamicBone_Ver02.ParticlePtn _ptn, float _damping, float _elasticity, float _stiffness)
	{
		_ptn.Damping = _damping;
		_ptn.Elasticity = _elasticity;
		_ptn.Stiffness = _stiffness;
		return true;
	}

	// Token: 0x0600004F RID: 79 RVA: 0x000062CC File Offset: 0x000044CC
	public virtual bool LoadTextList(List<string> _list)
	{
		global::DynamicBone_Ver02.LoadInfo loadInfo = new global::DynamicBone_Ver02.LoadInfo();
		int num = 0;
		while (_list.Count > num)
		{
			if (!this.LoadText(loadInfo, _list, ref num))
			{
				break;
			}
		}
		if (_list.Count > num)
		{
			return false;
		}
		this.Comment = loadInfo.Comment;
		this.ReflectSpeed = loadInfo.ReflectSpeed;
		this.HeavyLoopMaxCount = loadInfo.HeavyLoopMaxCount;
		this.Colliders = new List<global::DynamicBoneCollider>(loadInfo.Colliders);
		this.Bones = new List<Transform>(loadInfo.Bones);
		this.Patterns = new List<global::DynamicBone_Ver02.BonePtn>();
		foreach (global::DynamicBone_Ver02.BonePtn bonePtn in loadInfo.Patterns)
		{
			global::DynamicBone_Ver02.BonePtn bonePtn2 = new global::DynamicBone_Ver02.BonePtn();
			bonePtn2.Name = bonePtn.Name;
			bonePtn2.Gravity = bonePtn.Gravity;
			bonePtn2.EndOffset = bonePtn.EndOffset;
			bonePtn2.EndOffsetDamping = bonePtn.EndOffsetDamping;
			bonePtn2.EndOffsetElasticity = bonePtn.EndOffsetElasticity;
			bonePtn2.EndOffsetStiffness = bonePtn.EndOffsetStiffness;
			bonePtn2.EndOffsetInert = bonePtn.EndOffsetInert;
			foreach (global::DynamicBone_Ver02.BoneParameter boneParameter in bonePtn.Params)
			{
				global::DynamicBone_Ver02.BoneParameter boneParameter2 = new global::DynamicBone_Ver02.BoneParameter();
				boneParameter2.Name = boneParameter.Name;
				boneParameter2.RefTransform = boneParameter.RefTransform;
				boneParameter2.IsRotationCalc = boneParameter.IsRotationCalc;
				boneParameter2.Damping = boneParameter.Damping;
				boneParameter2.Elasticity = boneParameter.Elasticity;
				boneParameter2.Stiffness = boneParameter.Stiffness;
				boneParameter2.Inert = boneParameter.Inert;
				boneParameter2.NextBoneLength = boneParameter.NextBoneLength;
				boneParameter2.CollisionRadius = boneParameter.CollisionRadius;
				boneParameter2.IsMoveLimit = boneParameter.IsMoveLimit;
				boneParameter2.MoveLimitMin = boneParameter.MoveLimitMin;
				boneParameter2.MoveLimitMax = boneParameter.MoveLimitMax;
				boneParameter2.KeepLengthLimitMin = boneParameter.KeepLengthLimitMin;
				boneParameter2.KeepLengthLimitMax = boneParameter.KeepLengthLimitMax;
				boneParameter2.IsCrush = boneParameter.IsCrush;
				boneParameter2.CrushMoveAreaMin = boneParameter.CrushMoveAreaMin;
				boneParameter2.CrushMoveAreaMax = boneParameter.CrushMoveAreaMax;
				boneParameter2.CrushAddXYMin = boneParameter.CrushAddXYMin;
				boneParameter2.CrushAddXYMax = boneParameter.CrushAddXYMax;
				bonePtn2.Params.Add(boneParameter2);
			}
			this.Patterns.Add(bonePtn2);
		}
		this.InitNodeParticle();
		this.SetupParticles();
		this.InitLocalPosition();
		if (this.IsRefTransform())
		{
			this.setPtn(0, true);
		}
		this.InitTransforms();
		return true;
	}

	// Token: 0x06000050 RID: 80 RVA: 0x000065C4 File Offset: 0x000047C4
	public virtual void UpdateDynamicBones(float _deltaTime)
	{
		if (this.Root == null)
		{
			return;
		}
		this.ObjectScale = Mathf.Abs(this.Root.lossyScale.x);
		this.ObjectMove = this.Root.position - this.ObjectPrevPosition;
		this.ObjectPrevPosition = this.Root.position;
		int num = 1;
		if (this.UpdateRate > 0f)
		{
			float num2 = 1f / this.UpdateRate;
			this.UpdateTime += _deltaTime;
			num = 0;
			while (this.UpdateTime >= num2)
			{
				this.UpdateTime -= num2;
				if (++num >= this.HeavyLoopMaxCount)
				{
					this.UpdateTime = 0f;
					break;
				}
			}
		}
		if (num > 0)
		{
			for (int i = 0; i < num; i++)
			{
				this.UpdateParticles1();
				this.UpdateParticles2();
				this.ObjectMove = Vector3.zero;
			}
		}
		else
		{
			this.SkipUpdateParticles();
		}
		this.ApplyParticlesToTransforms();
	}

	// Token: 0x06000051 RID: 81 RVA: 0x000066E0 File Offset: 0x000048E0
	public virtual void InitNodeParticle()
	{
		if (this.Patterns == null)
		{
			return;
		}
		foreach (global::DynamicBone_Ver02.BonePtn bonePtn in this.Patterns)
		{
			if (bonePtn.ParticlePtns != null)
			{
				bonePtn.ParticlePtns.Clear();
			}
			else
			{
				bonePtn.ParticlePtns = new List<global::DynamicBone_Ver02.ParticlePtn>();
			}
			if (bonePtn.Params.Count != this.Bones.Count)
			{
				global::Debug.LogWarning("パラメータの数と骨の数があっていない");
			}
			else
			{
				foreach (var __AnonType in this.Bones.Select((Transform value, int idx) => new
				{
					value,
					idx
				}))
				{
					bonePtn.ParticlePtns.Add(this.AppendParticlePtn(bonePtn.Params[__AnonType.idx], Vector3.zero));
				}
				global::DynamicBone_Ver02.BoneParameter boneParameter = new global::DynamicBone_Ver02.BoneParameter();
				boneParameter.Damping = bonePtn.EndOffsetDamping;
				boneParameter.Elasticity = bonePtn.EndOffsetElasticity;
				boneParameter.Stiffness = bonePtn.EndOffsetStiffness;
				boneParameter.Inert = bonePtn.EndOffsetInert;
				bonePtn.ParticlePtns.Add(this.AppendParticlePtn(boneParameter, bonePtn.EndOffset));
			}
		}
	}

	// Token: 0x06000052 RID: 82 RVA: 0x00006884 File Offset: 0x00004A84
	public virtual void SetupParticles()
	{
		this.Particles.Clear();
		if (this.Root == null && this.Bones.Count > 0)
		{
			this.Root = this.Bones[0];
		}
		if (this.Root == null)
		{
			return;
		}
		if (this.Bones == null || this.Patterns == null)
		{
			return;
		}
		if (this.Bones.Count == 0 || this.Patterns.Count == 0)
		{
			return;
		}
		if (this.Bones.Count != this.Patterns[0].Params.Count)
		{
			return;
		}
		this.ObjectScale = this.Root.lossyScale.x;
		this.ObjectPrevPosition = this.Root.position;
		this.ObjectMove = Vector3.zero;
		int num = -1;
		foreach (var __AnonType in this.Bones.Select((Transform value, int idx) => new
		{
			value,
			idx
		}))
		{
			this.AppendParticles(__AnonType.value, this.Patterns[0].Params[__AnonType.idx], Vector3.zero, num);
			num++;
		}
		this.AppendParticles(null, new global::DynamicBone_Ver02.BoneParameter(), this.Patterns[0].EndOffset, num);
	}

	// Token: 0x06000053 RID: 83 RVA: 0x00006A30 File Offset: 0x00004C30
	public virtual global::DynamicBone_Ver02.ParticlePtn AppendParticlePtn(global::DynamicBone_Ver02.BoneParameter _parameter, Vector3 _endOffset)
	{
		global::DynamicBone_Ver02.ParticlePtn particlePtn = new global::DynamicBone_Ver02.ParticlePtn();
		particlePtn.IsRotationCalc = _parameter.IsRotationCalc;
		particlePtn.Damping = _parameter.Damping;
		particlePtn.Elasticity = _parameter.Elasticity;
		particlePtn.Stiffness = _parameter.Stiffness;
		particlePtn.Inert = _parameter.Inert;
		particlePtn.ScaleNextBoneLength = _parameter.NextBoneLength;
		particlePtn.Radius = _parameter.CollisionRadius;
		particlePtn.IsMoveLimit = _parameter.IsMoveLimit;
		particlePtn.MoveLimitMin = _parameter.MoveLimitMin;
		particlePtn.MoveLimitMax = _parameter.MoveLimitMax;
		particlePtn.KeepLengthLimitMin = _parameter.KeepLengthLimitMin;
		particlePtn.KeepLengthLimitMax = _parameter.KeepLengthLimitMax;
		particlePtn.IsCrush = _parameter.IsCrush;
		particlePtn.CrushMoveAreaMin = _parameter.CrushMoveAreaMin;
		particlePtn.CrushMoveAreaMax = _parameter.CrushMoveAreaMax;
		particlePtn.CrushAddXYMin = _parameter.CrushAddXYMin;
		particlePtn.CrushAddXYMax = _parameter.CrushAddXYMax;
		particlePtn.Damping = Mathf.Clamp01(particlePtn.Damping);
		particlePtn.Elasticity = Mathf.Clamp01(particlePtn.Elasticity);
		particlePtn.Stiffness = Mathf.Clamp01(particlePtn.Stiffness);
		particlePtn.Inert = Mathf.Clamp01(particlePtn.Inert);
		particlePtn.ScaleNextBoneLength = Mathf.Max(particlePtn.ScaleNextBoneLength, 0f);
		particlePtn.Radius = Mathf.Max(particlePtn.Radius, 0f);
		if (_parameter.RefTransform != null)
		{
			particlePtn.InitLocalPosition = _parameter.RefTransform.localPosition;
			particlePtn.InitLocalRotation = _parameter.RefTransform.localRotation;
			particlePtn.InitLocalScale = _parameter.RefTransform.localScale;
			particlePtn.refTrans = _parameter.RefTransform;
		}
		else
		{
			particlePtn.EndOffset = _endOffset;
		}
		return particlePtn;
	}

	// Token: 0x06000054 RID: 84 RVA: 0x00006BDC File Offset: 0x00004DDC
	public virtual global::DynamicBone_Ver02.Particle AppendParticles(Transform _transform, global::DynamicBone_Ver02.BoneParameter _parameter, Vector3 _endOffset, int _parentIndex)
	{
		global::DynamicBone_Ver02.Particle particle = new global::DynamicBone_Ver02.Particle();
		particle.Transform = _transform;
		particle.IsRotationCalc = _parameter.IsRotationCalc;
		particle.Damping = _parameter.Damping;
		particle.Elasticity = _parameter.Elasticity;
		particle.Stiffness = _parameter.Stiffness;
		particle.Inert = _parameter.Inert;
		particle.ScaleNextBoneLength = _parameter.NextBoneLength;
		particle.Radius = _parameter.CollisionRadius;
		particle.IsMoveLimit = _parameter.IsMoveLimit;
		particle.MoveLimitMin = _parameter.MoveLimitMin;
		particle.MoveLimitMax = _parameter.MoveLimitMax;
		particle.KeepLengthLimitMin = _parameter.KeepLengthLimitMin;
		particle.KeepLengthLimitMax = _parameter.KeepLengthLimitMax;
		particle.IsCrush = _parameter.IsCrush;
		particle.CrushMoveAreaMin = _parameter.CrushMoveAreaMin;
		particle.CrushMoveAreaMax = _parameter.CrushMoveAreaMax;
		particle.CrushAddXYMin = _parameter.CrushAddXYMin;
		particle.CrushAddXYMax = _parameter.CrushAddXYMax;
		particle.ParentIndex = _parentIndex;
		particle.Damping = Mathf.Clamp01(particle.Damping);
		particle.Elasticity = Mathf.Clamp01(particle.Elasticity);
		particle.Stiffness = Mathf.Clamp01(particle.Stiffness);
		particle.Inert = Mathf.Clamp01(particle.Inert);
		particle.ScaleNextBoneLength = Mathf.Max(particle.ScaleNextBoneLength, 0f);
		particle.Radius = Mathf.Max(particle.Radius, 0f);
		if (_transform != null)
		{
			particle.Position = (particle.PrevPosition = _transform.position);
			particle.InitLocalPosition = _transform.localPosition;
			particle.InitLocalRotation = _transform.localRotation;
			particle.refTrans = _transform;
			if (_parentIndex >= 0)
			{
				this.CalcLocalPosition(particle, this.Particles[_parentIndex]);
			}
		}
		else
		{
			Transform transform = this.Particles[_parentIndex].Transform;
			particle.EndOffset = _endOffset;
			particle.Position = (particle.PrevPosition = transform.TransformPoint(particle.EndOffset));
		}
		this.Particles.Add(particle);
		return particle;
	}

	// Token: 0x06000055 RID: 85 RVA: 0x00006DE0 File Offset: 0x00004FE0
	public virtual void InitTransforms()
	{
		int count = this.Particles.Count;
		for (int i = 0; i < count; i++)
		{
			global::DynamicBone_Ver02.Particle particle = this.Particles[i];
			if (!(particle.Transform == null))
			{
				if (particle.refTrans != null)
				{
					particle.Transform.localPosition = particle.refTrans.localPosition;
					particle.Transform.localRotation = particle.refTrans.localRotation;
					particle.Transform.localScale = particle.refTrans.localScale;
				}
				else
				{
					particle.Transform.localPosition = particle.InitLocalPosition;
					particle.Transform.localRotation = particle.InitLocalRotation;
					particle.Transform.localScale = particle.InitLocalScale;
				}
			}
		}
	}

	// Token: 0x06000056 RID: 86 RVA: 0x00006EBC File Offset: 0x000050BC
	public virtual void UpdateParticles1()
	{
		if (this.Patterns == null || (this.Patterns != null && this.Patterns.Count == 0))
		{
			return;
		}
		Vector3 b = (this.Gravity + this.Force) * this.ObjectScale;
		for (int i = 0; i < this.Particles.Count; i++)
		{
			global::DynamicBone_Ver02.Particle particle = this.Particles[i];
			if (particle.ParentIndex >= 0)
			{
				Vector3 a = (particle.Position - particle.PrevPosition) * this.ReflectSpeed;
				Vector3 b2 = this.ObjectMove * particle.Inert;
				particle.PrevPosition = particle.Position + b2;
				particle.Position += a * (1f - particle.Damping) + b + b2;
			}
			else
			{
				particle.PrevPosition = particle.Position;
				particle.Position = particle.Transform.position;
			}
		}
	}

	// Token: 0x06000057 RID: 87 RVA: 0x00006FD8 File Offset: 0x000051D8
	public virtual void UpdateParticles2()
	{
		for (int i = 1; i < this.Particles.Count; i++)
		{
			global::DynamicBone_Ver02.Particle particle = this.Particles[i];
			global::DynamicBone_Ver02.Particle particle2 = this.Particles[particle.ParentIndex];
			float num;
			if (particle.Transform != null)
			{
				num = (particle2.Transform.position - particle.Transform.position).magnitude;
			}
			else
			{
				num = particle.EndOffset.magnitude * this.ObjectScale;
			}
			float num2 = Mathf.Lerp(1f, particle.Stiffness, this.Weight);
			if (num2 > 0f || particle.Elasticity > 0f)
			{
				Matrix4x4 localToWorldMatrix = particle2.Transform.localToWorldMatrix;
				localToWorldMatrix.SetColumn(3, particle2.Position);
				Vector3 a;
				if (particle.Transform != null)
				{
					a = localToWorldMatrix.MultiplyPoint3x4(particle.LocalPosition);
				}
				else
				{
					a = localToWorldMatrix.MultiplyPoint3x4(particle.EndOffset);
				}
				Vector3 a2 = a - particle.Position;
				particle.Position += a2 * particle.Elasticity;
				if (num2 > 0f)
				{
					a2 = a - particle.Position;
					float magnitude = a2.magnitude;
					float num3 = num * (1f - num2) * 2f;
					if (magnitude > num3)
					{
						particle.Position += a2 * ((magnitude - num3) / magnitude);
					}
				}
			}
			float particleRadius = particle.Radius * this.ObjectScale;
			foreach (global::DynamicBoneCollider dynamicBoneCollider in this.Colliders)
			{
				if (dynamicBoneCollider != null && dynamicBoneCollider.enabled)
				{
					dynamicBoneCollider.Collide(ref particle.Position, particleRadius);
				}
			}
			Vector3 a3 = particle2.Position - particle.Position;
			float magnitude2 = a3.magnitude;
			if (magnitude2 > 0f)
			{
				float num4 = (magnitude2 - num) / magnitude2;
				if (particle.KeepLengthLimitMin >= num4)
				{
					particle.Position += a3 * (num4 - particle.KeepLengthLimitMin);
				}
				else if (num4 >= particle.KeepLengthLimitMax)
				{
					particle.Position += a3 * (num4 - particle.KeepLengthLimitMax);
				}
			}
		}
	}

	// Token: 0x06000058 RID: 88 RVA: 0x00007294 File Offset: 0x00005494
	public virtual void SkipUpdateParticles()
	{
		for (int i = 0; i < this.Particles.Count; i++)
		{
			global::DynamicBone_Ver02.Particle particle = this.Particles[i];
			if (particle.ParentIndex >= 0)
			{
				Vector3 b = this.ObjectMove * particle.Inert;
				particle.PrevPosition += b;
				particle.Position += b;
				global::DynamicBone_Ver02.Particle particle2 = this.Particles[particle.ParentIndex];
				float num;
				if (particle.Transform != null)
				{
					num = (particle2.Transform.position - particle.Transform.position).magnitude;
				}
				else
				{
					num = particle.EndOffset.magnitude * this.ObjectScale;
				}
				float num2 = Mathf.Lerp(1f, particle.Stiffness, this.Weight);
				if (num2 > 0f)
				{
					Matrix4x4 localToWorldMatrix = particle2.Transform.localToWorldMatrix;
					localToWorldMatrix.SetColumn(3, particle2.Position);
					Vector3 a;
					if (particle.Transform != null)
					{
						a = localToWorldMatrix.MultiplyPoint3x4(particle.LocalPosition);
					}
					else
					{
						a = localToWorldMatrix.MultiplyPoint3x4(particle.EndOffset);
					}
					Vector3 a2 = a - particle.Position;
					float magnitude = a2.magnitude;
					float num3 = num * (1f - num2) * 2f;
					if (magnitude > num3)
					{
						particle.Position += a2 * ((magnitude - num3) / magnitude);
					}
				}
				Vector3 a3 = particle2.Position - particle.Position;
				float magnitude2 = a3.magnitude;
				if (magnitude2 > 0f)
				{
					float num4 = (magnitude2 - num) / magnitude2;
					if (particle.KeepLengthLimitMin >= num4)
					{
						particle.Position += a3 * (num4 - particle.KeepLengthLimitMin);
					}
					else if (num4 >= particle.KeepLengthLimitMax)
					{
						particle.Position += a3 * (num4 - particle.KeepLengthLimitMax);
					}
				}
			}
			else
			{
				particle.PrevPosition = particle.Position;
				particle.Position = particle.Transform.position;
			}
		}
	}

	// Token: 0x06000059 RID: 89 RVA: 0x000074F0 File Offset: 0x000056F0
	public virtual void ApplyParticlesToTransforms()
	{
		for (int i = 1; i < this.Particles.Count; i++)
		{
			global::DynamicBone_Ver02.Particle particle = this.Particles[i];
			global::DynamicBone_Ver02.Particle particle2 = this.Particles[particle.ParentIndex];
			if (particle2.IsRotationCalc)
			{
				Vector3 direction;
				if (particle.Transform != null)
				{
					direction = particle.LocalPosition;
				}
				else
				{
					direction = particle.EndOffset;
				}
				Vector3 vector = particle2.Transform.TransformDirection(direction);
				Vector3 toDirection = particle.Position - particle2.Position;
				float magnitude = direction.magnitude;
				if (magnitude != 0f)
				{
					toDirection = particle.Position + vector * -1f * (1f - particle2.ScaleNextBoneLength) - particle2.Position;
				}
				Quaternion lhs = Quaternion.FromToRotation(vector, toDirection);
				particle2.Transform.rotation = lhs * particle2.Transform.rotation;
			}
			if (particle.Transform)
			{
				Matrix4x4 localToWorldMatrix = particle.Transform.localToWorldMatrix;
				Vector3 v = localToWorldMatrix.inverse.MultiplyPoint3x4(particle.Position);
				if (particle.IsCrush)
				{
					float num2;
					if (v.z <= 0f)
					{
						float num = Mathf.Clamp01(Mathf.InverseLerp(particle.CrushMoveAreaMin, 0f, v.z));
						num2 = particle.CrushAddXYMin * (1f - num);
					}
					else
					{
						float num3 = Mathf.Clamp01(Mathf.InverseLerp(0f, particle.CrushMoveAreaMax, v.z));
						num2 = particle.CrushAddXYMax * num3;
					}
					particle.Transform.localScale = particle.InitLocalScale + new Vector3(num2, num2, 0f);
				}
				if (particle.IsMoveLimit)
				{
					v.x = Mathf.Clamp(v.x, particle.MoveLimitMin.x, particle.MoveLimitMax.x);
					v.y = Mathf.Clamp(v.y, particle.MoveLimitMin.y, particle.MoveLimitMax.y);
					v.z = Mathf.Clamp(v.z, particle.MoveLimitMin.z, particle.MoveLimitMax.z);
					particle.Transform.position = localToWorldMatrix.MultiplyPoint3x4(v);
				}
				else
				{
					particle.Transform.position = particle.Position;
				}
			}
		}
	}

	// Token: 0x0600005A RID: 90 RVA: 0x00007784 File Offset: 0x00005984
	public virtual void CalcLocalPosition(global::DynamicBone_Ver02.Particle _particle, global::DynamicBone_Ver02.Particle _parent)
	{
		_particle.LocalPosition = _parent.Transform.InverseTransformPoint(_particle.Position);
	}

	// Token: 0x0600005B RID: 91 RVA: 0x000077A0 File Offset: 0x000059A0
	public virtual Vector3 CalcLocalPosition(Vector3 _particle, Transform _parent)
	{
		return _parent.InverseTransformPoint(_particle);
	}

	// Token: 0x0600005C RID: 92 RVA: 0x000077AC File Offset: 0x000059AC
	public virtual bool IsRefTransform()
	{
		if (this.Patterns == null)
		{
			return false;
		}
		foreach (global::DynamicBone_Ver02.BonePtn bonePtn in this.Patterns)
		{
			if (bonePtn.Params == null)
			{
				return false;
			}
			foreach (global::DynamicBone_Ver02.BoneParameter boneParameter in bonePtn.Params)
			{
				if (boneParameter.RefTransform == null)
				{
					return false;
				}
			}
		}
		return true;
	}

	// Token: 0x0600005D RID: 93 RVA: 0x00007880 File Offset: 0x00005A80
	public virtual Transform FindLoop(Transform transform, string name)
	{
		if (string.Compare(name, transform.name) == 0)
		{
			return transform;
		}
		foreach (object obj in transform)
		{
			Transform transform2 = (Transform)obj;
			Transform transform3 = this.FindLoop(transform2, name);
			if (null != transform3)
			{
				return transform3;
			}
		}
		return null;
	}

	// Token: 0x0600005E RID: 94 RVA: 0x0000790C File Offset: 0x00005B0C
	public virtual bool LoadText(global::DynamicBone_Ver02.LoadInfo _info, List<string> _list, ref int _index)
	{
		string[] array = _list[_index].Split(new char[]
		{
			'\t'
		});
		int num = array.Length;
		if (num == 0)
		{
			global::Debug.LogWarning("行に空欄があります？");
			return false;
		}
		string text = array[0].Substring(0, 2);
		if (text.Equals("//"))
		{
			_index++;
			return true;
		}
		string text2 = array[0];
        /*if (text2 != null)
        {
            if (global::DynamicBone_Ver02.<>f__switch$map0 == null)
            {
                global::DynamicBone_Ver02.<>f__switch$map0 = new Dictionary<string, int>(6)
                {
                    {
                        "#Comment",
                        0
                    },
                    {
                        "#ReflectSpeed",
                        1
                    },
                    {
                        "#HeavyLoopMaxCount",
                        2
                    },
                    {
                        "#Colliders name",
                        3
                    },
                    {
                        "#Bone name",
                        4
                    },
                    {
                        "#PtnClassMember",
                        5
                    }
                };
            }
			int num2;
			if (global::DynamicBone_Ver02.<>f__switch$map0.TryGetValue(text2, out num2))
			{
				switch (num2)
				{
				case 0:
					_info.Comment = array[1];
					break;
				case 1:
				{
					float reflectSpeed;
					if (!float.TryParse(array[1], out reflectSpeed))
					{
						global::Debug.LogWarning("ReflectSpeedの数値取得に失敗");
						return false;
					}
					_info.ReflectSpeed = reflectSpeed;
					break;
				}
				case 2:
				{
					int heavyLoopMaxCount;
					if (!int.TryParse(array[1], out heavyLoopMaxCount))
					{
						global::Debug.LogWarning("HeavyLoopMaxCountの数値取得に失敗");
						return false;
					}
					_info.HeavyLoopMaxCount = heavyLoopMaxCount;
					break;
				}
				case 3:
					for (int i = 1; i < num; i++)
					{
						if (array[i] == string.Empty || array[i] == " ")
						{
							break;
						}
						Transform transform = this.FindLoop(base.transform, array[i]);
						if (transform == null)
						{
							global::Debug.LogWarning("[Colliders name] " + array[i] + " この名前のフレームは見つかりません");
							return false;
						}
						global::DynamicBoneCollider component = transform.GetComponent<global::DynamicBoneCollider>();
						if (component == null)
						{
							global::Debug.LogWarning("[Colliders name] " + array[i] + " このフレームにDynamicBoneColliderコンポーネントは付いていません");
							return false;
						}
						_info.Colliders.Add(component);
					}
					break;
				case 4:
					for (int j = 1; j < num; j++)
					{
						if (array[j] == string.Empty || array[j] == " ")
						{
							break;
						}
						Transform transform2 = this.FindLoop(base.transform, array[j]);
						if (transform2 == null)
						{
							global::Debug.LogWarning("[Bone name] " + array[j] + " この名前のフレームは見つかりません");
							return false;
						}
						_info.Bones.Add(transform2);
					}
					break;
				case 5:
				{
					global::DynamicBone_Ver02.BonePtn bonePtn = new global::DynamicBone_Ver02.BonePtn();
					if (!this.LoadPtnClassMember(bonePtn, array, _index))
					{
						return false;
					}
					_index++;
					if (!this.LoadParamClassMember(bonePtn, _list, ref _index))
					{
						return false;
					}
					_info.Patterns.Add(bonePtn);
					return true;
				}
				default:
					goto IL_2E0;
				}
				_index++;
				return true;
			}
		}
		IL_2E0:
		global::Debug.LogWarning(string.Concat(new object[]
		{
			"テキスト：識別不能 ",
			array[0],
			" [index]:",
			_index
		}));*/
		return false;
	}

	// Token: 0x0600005F RID: 95 RVA: 0x00007C34 File Offset: 0x00005E34
	public virtual bool LoadPtnClassMember(global::DynamicBone_Ver02.BonePtn _ptn, string[] _str, int _index)
	{
		int length = _str.Length;
		int num = 0;
		if (!this.ChekcLength(length, ref num, _index, "[PtnClassMember] 表示する名前", string.Empty))
		{
			return false;
		}
		_ptn.Name = _str[num];
		float num2;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] 重力X", string.Empty))
		{
			return false;
		}
		Vector3 vector = _ptn.Gravity;
		vector.x = num2;
		_ptn.Gravity = vector;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] 重力Y", string.Empty))
		{
			return false;
		}
		vector = _ptn.Gravity;
		vector.y = num2;
		_ptn.Gravity = vector;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] 重力Z", string.Empty))
		{
			return false;
		}
		vector = _ptn.Gravity;
		vector.z = num2;
		_ptn.Gravity = vector;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] EndOffsetX", string.Empty))
		{
			return false;
		}
		vector = _ptn.EndOffset;
		vector.x = num2;
		_ptn.EndOffset = vector;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] EndOffsetY", string.Empty))
		{
			return false;
		}
		vector = _ptn.EndOffset;
		vector.y = num2;
		_ptn.EndOffset = vector;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] EndOffsetZ", string.Empty))
		{
			return false;
		}
		vector = _ptn.EndOffset;
		vector.z = num2;
		_ptn.EndOffset = vector;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] EndOffsetの空気抵抗", string.Empty))
		{
			return false;
		}
		_ptn.EndOffsetDamping = num2;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] EndOffsetの弾力", string.Empty))
		{
			return false;
		}
		_ptn.EndOffsetElasticity = num2;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] EndOffsetの硬さ", string.Empty))
		{
			return false;
		}
		_ptn.EndOffsetStiffness = num2;
		if (!this.GetMemberFloat(length, _str, ref num, _index, out num2, "[PtnClassMember] EndOffsetの惰性", string.Empty))
		{
			return false;
		}
		_ptn.EndOffsetInert = num2;
		return true;
	}

	// Token: 0x06000060 RID: 96 RVA: 0x00007E38 File Offset: 0x00006038
	public virtual bool LoadParamClassMember(global::DynamicBone_Ver02.BonePtn _ptn, List<string> _list, ref int _index)
	{
		while (_list.Count > _index)
		{
			string[] array = _list[_index].Split(new char[]
			{
				'\t'
			});
			int num = array.Length;
			int num2 = 0;
			float num3 = 0f;
			bool flag = false;
			if (num <= num2)
			{
				global::Debug.LogWarning("[ParamClassMember] 行に空欄があります？");
				return false;
			}
			string text = array[num2].Substring(0, 2);
			if (text.Equals("//"))
			{
				_index++;
			}
			else
			{
				if (array[num2] != "#ParamClassMember")
				{
					break;
				}
				global::DynamicBone_Ver02.BoneParameter boneParameter = new global::DynamicBone_Ver02.BoneParameter();
				if (!this.ChekcLength(num, ref num2, _index, "[ParamClassMember] 表示する名前", string.Empty))
				{
					return false;
				}
				boneParameter.Name = array[num2];
				if (!this.ChekcLength(num, ref num2, _index, "[ParamClassMember] 参照するフレーム", string.Empty))
				{
					return false;
				}
				Transform transform = this.FindLoop(base.transform, array[num2]);
				if (transform == null)
				{
					global::Debug.LogWarning("[ParamClassMember] " + array[num2] + " この名前のフレームは見つかりません");
					return false;
				}
				boneParameter.RefTransform = transform;
				if (!this.GetMemberBool(num, array, ref num2, _index, out flag, "[ParamClassMember] 回転するか ", string.Empty))
				{
					return false;
				}
				boneParameter.IsRotationCalc = flag;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 空気抵抗", string.Empty))
				{
					return false;
				}
				boneParameter.Damping = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 弾力", string.Empty))
				{
					return false;
				}
				boneParameter.Elasticity = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 硬さ", string.Empty))
				{
					return false;
				}
				boneParameter.Stiffness = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 惰性", string.Empty))
				{
					return false;
				}
				boneParameter.Inert = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 次の骨までの距離補正", string.Empty))
				{
					return false;
				}
				boneParameter.NextBoneLength = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 当たり判定の半径", string.Empty))
				{
					return false;
				}
				boneParameter.CollisionRadius = num3;
				if (!this.GetMemberBool(num, array, ref num2, _index, out flag, "[ParamClassMember] 移動制限するか ", string.Empty))
				{
					return false;
				}
				boneParameter.IsMoveLimit = flag;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 移動制限最小X", string.Empty))
				{
					return false;
				}
				Vector3 vector = boneParameter.MoveLimitMin;
				vector.x = num3;
				boneParameter.MoveLimitMin = vector;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 移動制限最小Y", string.Empty))
				{
					return false;
				}
				vector = boneParameter.MoveLimitMin;
				vector.y = num3;
				boneParameter.MoveLimitMin = vector;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 移動制限最小Z", string.Empty))
				{
					return false;
				}
				vector = boneParameter.MoveLimitMin;
				vector.z = num3;
				boneParameter.MoveLimitMin = vector;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 移動制限最大X", string.Empty))
				{
					return false;
				}
				vector = boneParameter.MoveLimitMax;
				vector.x = num3;
				boneParameter.MoveLimitMax = vector;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 移動制限最大Y", string.Empty))
				{
					return false;
				}
				vector = boneParameter.MoveLimitMax;
				vector.y = num3;
				boneParameter.MoveLimitMax = vector;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 移動制限最大Z", string.Empty))
				{
					return false;
				}
				vector = boneParameter.MoveLimitMax;
				vector.z = num3;
				boneParameter.MoveLimitMax = vector;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 親からの長さの補正しない範囲最小", string.Empty))
				{
					return false;
				}
				boneParameter.KeepLengthLimitMin = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 親からの長さの補正しない範囲最大", string.Empty))
				{
					return false;
				}
				boneParameter.KeepLengthLimitMax = num3;
				if (!this.GetMemberBool(num, array, ref num2, _index, out flag, "[ParamClassMember] 潰すか ", string.Empty))
				{
					return false;
				}
				boneParameter.IsCrush = flag;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 潰す移動判断範囲最小", string.Empty))
				{
					return false;
				}
				boneParameter.CrushMoveAreaMin = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 潰す移動判断範囲最大", string.Empty))
				{
					return false;
				}
				boneParameter.CrushMoveAreaMax = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 潰れた時に加算するXYスケール", string.Empty))
				{
					return false;
				}
				boneParameter.CrushAddXYMin = num3;
				if (!this.GetMemberFloat(num, array, ref num2, _index, out num3, "[ParamClassMember] 伸びた時に加算するXYスケール", string.Empty))
				{
					return false;
				}
				boneParameter.CrushAddXYMax = num3;
				_ptn.Params.Add(boneParameter);
				_index++;
			}
		}
		return true;
	}

	// Token: 0x06000061 RID: 97 RVA: 0x00008310 File Offset: 0x00006510
	public virtual bool ChekcLength(int _length, ref int _index, int _line, string _warning = "", string _warning1 = "")
	{
		if (_length <= ++_index)
		{
			global::Debug.LogWarning(string.Concat(new object[]
			{
				_warning,
				"までの設定数が足りない [",
				_line,
				"行目] ",
				_warning1
			}));
			return false;
		}
		return true;
	}

	// Token: 0x06000062 RID: 98 RVA: 0x00008364 File Offset: 0x00006564
	public virtual bool GetMemberFloat(int _length, string[] _str, ref int _index, int _line, out float _param, string _warning = "", string _warning1 = "")
	{
		_param = 0f;
		if (!this.ChekcLength(_length, ref _index, _line, _warning, string.Empty))
		{
			return false;
		}
		if (!float.TryParse(_str[_index], out _param))
		{
			global::Debug.LogWarning(string.Concat(new object[]
			{
				_warning,
				"が取得できない [",
				_line,
				"行目] ",
				_str[_index],
				_warning1
			}));
			return false;
		}
		return true;
	}

	// Token: 0x06000063 RID: 99 RVA: 0x000083E0 File Offset: 0x000065E0
	public virtual bool GetMemberInt(int _length, string[] _str, ref int _index, int _line, out int _param, string _warning = "", string _warning1 = "")
	{
		_param = 0;
		if (!this.ChekcLength(_length, ref _index, _line, _warning, string.Empty))
		{
			return false;
		}
		if (!int.TryParse(_str[_index], out _param))
		{
			global::Debug.LogWarning(string.Concat(new object[]
			{
				_warning,
				"が取得できない [",
				_line,
				"行目] ",
				_str[_index],
				_warning1
			}));
			return false;
		}
		return true;
	}

	// Token: 0x06000064 RID: 100 RVA: 0x00008458 File Offset: 0x00006658
	public virtual bool GetMemberBool(int _length, string[] _str, ref int _index, int _line, out bool _param, string _warning = "", string _warning1 = "")
	{
		_param = false;
		if (!this.ChekcLength(_length, ref _index, _line, _warning, string.Empty))
		{
			return false;
		}
		if (_str[_index] == "false" || _str[_index] == "FALSE" || _str[_index] == "False")
		{
			_param = false;
			return true;
		}
		if (_str[_index] == "true" || _str[_index] == "TRUE" || _str[_index] == "True")
		{
			_param = true;
			return true;
		}
		global::Debug.LogWarning(string.Concat(new object[]
		{
			_warning,
			"が取得できない [",
			_line,
			"行目] ",
			_str[_index],
			_warning1
		}));
		return false;
	}

	// Token: 0x06000065 RID: 101 RVA: 0x0000853C File Offset: 0x0000673C
	public virtual void SaveText(StreamWriter _writer)
	{
		_writer.Write("//コメント\n");
		_writer.Write("#Comment\t" + this.Comment + "\n");
		_writer.Write("//粒子のスピード\n");
		_writer.Write("#ReflectSpeed\t" + this.ReflectSpeed.ToString() + "\n");
		_writer.Write("//重い時に何回まで回すか\u3000回数多いと正確になるけど更に重くなるよ\n");
		_writer.Write("#HeavyLoopMaxCount\t" + this.HeavyLoopMaxCount.ToString() + "\n");
		_writer.Write("//登録する当たり判定の名前\n");
		_writer.Write("#Colliders name\t");
		foreach (global::DynamicBoneCollider dynamicBoneCollider in this.Colliders)
		{
			_writer.Write(dynamicBoneCollider.gameObject.name + "\t");
		}
		_writer.Write("\n");
		_writer.Write("//登録する骨の名前\n");
		_writer.Write("#Bone name\t");
		foreach (Transform transform in this.Bones)
		{
			_writer.Write(transform.name + "\t");
		}
		_writer.Write("\n");
		foreach (global::DynamicBone_Ver02.BonePtn bonePtn in this.Patterns)
		{
			_writer.Write("//パターンの設定\n");
			_writer.Write("//PtnClass\t");
			_writer.Write("表示する名前\t");
			_writer.Write("重力 X\t");
			_writer.Write("重力 Y\t");
			_writer.Write("重力 Z\t");
			_writer.Write("EndOffset x\t");
			_writer.Write("EndOffset y\t");
			_writer.Write("EndOffset z\t");
			_writer.Write("EndOffsetの空気抵抗\t");
			_writer.Write("EndOffsetの弾力\t");
			_writer.Write("EndOffsetの硬さ\t");
			_writer.Write("EndOffsetの惰性\t");
			_writer.Write("\n");
			_writer.Write("#PtnClassMember\t");
			_writer.Write(bonePtn.Name + "\t");
			_writer.Write(bonePtn.Gravity.x.ToString() + "\t");
			_writer.Write(bonePtn.Gravity.y.ToString() + "\t");
			_writer.Write(bonePtn.Gravity.z.ToString() + "\t");
			_writer.Write(bonePtn.EndOffset.x.ToString() + "\t");
			_writer.Write(bonePtn.EndOffset.y.ToString() + "\t");
			_writer.Write(bonePtn.EndOffset.z.ToString() + "\t");
			_writer.Write(bonePtn.EndOffsetDamping.ToString() + "\t");
			_writer.Write(bonePtn.EndOffsetElasticity.ToString() + "\t");
			_writer.Write(bonePtn.EndOffsetStiffness.ToString() + "\t");
			_writer.Write(bonePtn.EndOffsetInert.ToString() + "\t");
			_writer.Write("\n");
			_writer.Write("//そのパターンの骨に対するパラメーター\n");
			_writer.Write("//ParamClass\t");
			_writer.Write("表示する名前\t");
			_writer.Write("参照するフレーム名\t");
			_writer.Write("回転する？\t");
			_writer.Write("空気抵抗\t");
			_writer.Write("弾力\t");
			_writer.Write("硬さ\t");
			_writer.Write("惰性\t");
			_writer.Write("次の骨までの距離補正\t");
			_writer.Write("当たり判定の半径\t");
			_writer.Write("移動制限する？\t");
			_writer.Write("移動制限最小X\t");
			_writer.Write("移動制限最小Y\t");
			_writer.Write("移動制限最小Z\t");
			_writer.Write("移動制限最大X\t");
			_writer.Write("移動制限最大Y\t");
			_writer.Write("移動制限最大Z\t");
			_writer.Write("親からの長さを補正しない範囲最小値\t");
			_writer.Write("親からの長さを補正しない範囲最大値\t");
			_writer.Write("潰す？\t");
			_writer.Write("潰す移動判断範囲最小\t");
			_writer.Write("潰す移動判断範囲最大\t");
			_writer.Write("潰れた時に加算するXYスケール\t");
			_writer.Write("伸びた時に加算するXYスケール\t");
			_writer.Write("\n");
			foreach (global::DynamicBone_Ver02.BoneParameter boneParameter in bonePtn.Params)
			{
				_writer.Write("#ParamClassMember\t");
				_writer.Write(boneParameter.Name + "\t");
				string str = string.Empty;
				if (boneParameter.RefTransform != null)
				{
					str = boneParameter.RefTransform.name;
				}
				_writer.Write(str + "\t");
				_writer.Write(boneParameter.IsRotationCalc.ToString() + "\t");
				_writer.Write(boneParameter.Damping.ToString() + "\t");
				_writer.Write(boneParameter.Elasticity.ToString() + "\t");
				_writer.Write(boneParameter.Stiffness.ToString() + "\t");
				_writer.Write(boneParameter.Inert.ToString() + "\t");
				_writer.Write(boneParameter.NextBoneLength.ToString() + "\t");
				_writer.Write(boneParameter.CollisionRadius.ToString() + "\t");
				_writer.Write(boneParameter.IsMoveLimit.ToString() + "\t");
				_writer.Write(boneParameter.MoveLimitMin.x.ToString() + "\t");
				_writer.Write(boneParameter.MoveLimitMin.y.ToString() + "\t");
				_writer.Write(boneParameter.MoveLimitMin.z.ToString() + "\t");
				_writer.Write(boneParameter.MoveLimitMax.x.ToString() + "\t");
				_writer.Write(boneParameter.MoveLimitMax.y.ToString() + "\t");
				_writer.Write(boneParameter.MoveLimitMax.z.ToString() + "\t");
				_writer.Write(boneParameter.KeepLengthLimitMin.ToString() + "\t");
				_writer.Write(boneParameter.KeepLengthLimitMax.ToString() + "\t");
				_writer.Write(boneParameter.IsCrush.ToString() + "\t");
				_writer.Write(boneParameter.CrushMoveAreaMin.ToString() + "\t");
				_writer.Write(boneParameter.CrushMoveAreaMin.ToString() + "\t");
				_writer.Write(boneParameter.CrushAddXYMin.ToString() + "\t");
				_writer.Write(boneParameter.CrushAddXYMax.ToString() + "\t");
				_writer.Write("\n");
			}
		}
	}

	// Token: 0x0400006F RID: 111
	public string Comment = string.Empty;

	// Token: 0x04000070 RID: 112
	public Transform Root;

	// Token: 0x04000071 RID: 113
	public float UpdateRate = 60f;

	// Token: 0x04000072 RID: 114
	[Range(0f, 100f)]
	[Tooltip("速度UP")]
	public float ReflectSpeed = 1f;

	// Token: 0x04000073 RID: 115
	[Tooltip("重い時に何回まで回す？正確になるけどその分重くなる")]
	[Range(0f, 10f)]
	public int HeavyLoopMaxCount = 3;

	// Token: 0x04000074 RID: 116
	public Vector3 Gravity = Vector3.zero;

	// Token: 0x04000075 RID: 117
	public Vector3 Force = Vector3.zero;

	// Token: 0x04000076 RID: 118
	public List<global::DynamicBoneCollider> Colliders;

	// Token: 0x04000077 RID: 119
	public List<Transform> Bones;

	// Token: 0x04000078 RID: 120
	public List<global::DynamicBone_Ver02.BonePtn> Patterns;

	// Token: 0x04000079 RID: 121
	protected Vector3 ObjectMove = Vector3.zero;

	// Token: 0x0400007A RID: 122
	protected Vector3 ObjectPrevPosition = Vector3.zero;

	// Token: 0x0400007B RID: 123
	protected float ObjectScale = 1f;

	// Token: 0x0400007C RID: 124
	protected float UpdateTime;

	// Token: 0x0400007D RID: 125
	protected float Weight = 1f;

	// Token: 0x0400007E RID: 126
	protected List<global::DynamicBone_Ver02.Particle> Particles = new List<global::DynamicBone_Ver02.Particle>();

	// Token: 0x0400007F RID: 127
	public int PtnNo;

	// Token: 0x04000080 RID: 128
	public string DragAndDrop = string.Empty;

	// Token: 0x0200000D RID: 13
	[Serializable]
	public class BoneParameter
	{
		// Token: 0x06000068 RID: 104 RVA: 0x00008D80 File Offset: 0x00006F80
		public BoneParameter()
		{
			this.Name = string.Empty;
			this.IsRotationCalc = false;
			this.Damping = 0f;
			this.Elasticity = 0f;
			this.Stiffness = 0f;
			this.Inert = 0f;
			this.NextBoneLength = 1f;
			this.CollisionRadius = 0f;
			this.IsMoveLimit = false;
			this.MoveLimitMin = Vector3.zero;
			this.MoveLimitMax = Vector3.zero;
			this.KeepLengthLimitMin = 0f;
			this.KeepLengthLimitMax = 0f;
			this.IsCrush = false;
			this.CrushMoveAreaMin = 0f;
			this.CrushMoveAreaMax = 0f;
			this.CrushAddXYMin = 0f;
			this.CrushAddXYMax = 0f;
		}

		// Token: 0x04000084 RID: 132
		public string Name = string.Empty;

		// Token: 0x04000085 RID: 133
		[Tooltip("参照骨")]
		public Transform RefTransform;

		// Token: 0x04000086 RID: 134
		[Tooltip("回転させる？")]
		public bool IsRotationCalc;

		// Token: 0x04000087 RID: 135
		[Range(0f, 1f)]
		[Tooltip("空気抵抗")]
		public float Damping;

		// Token: 0x04000088 RID: 136
		[Tooltip("弾力(元の位置に戻ろうとする力)")]
		[Range(0f, 1f)]
		public float Elasticity;

		// Token: 0x04000089 RID: 137
		[Range(0f, 1f)]
		[Tooltip("硬さ(要は移動のリミット：移動制限)")]
		public float Stiffness;

		// Token: 0x0400008A RID: 138
		[Tooltip("惰性(ルートが動いた分を加算するか 加算すると親子付されてる感じになる？)")]
		[Range(0f, 1f)]
		public float Inert;

		// Token: 0x0400008B RID: 139
		[Tooltip("次の骨までの長さの制御(回転に影響する：短いと回りやすい(角度が出やすい)\u3000長いと回りにくい(角度が出にくい))")]
		[Range(0f, 100f)]
		public float NextBoneLength = 1f;

		// Token: 0x0400008C RID: 140
		[Tooltip("コリジョンの大きさ")]
		public float CollisionRadius;

		// Token: 0x0400008D RID: 141
		[Tooltip("移動制限")]
		public bool IsMoveLimit;

		// Token: 0x0400008E RID: 142
		[Tooltip("ローカル移動制限最小")]
		public Vector3 MoveLimitMin = Vector3.zero;

		// Token: 0x0400008F RID: 143
		[Tooltip("ローカル移動制限最大")]
		public Vector3 MoveLimitMax = Vector3.zero;

		// Token: 0x04000090 RID: 144
		[Tooltip("骨の長さを留める制限最小")]
		public float KeepLengthLimitMin;

		// Token: 0x04000091 RID: 145
		[Tooltip("骨の長さを留める制限最大")]
		public float KeepLengthLimitMax;

		// Token: 0x04000092 RID: 146
		[Tooltip("潰れ制御")]
		public bool IsCrush;

		// Token: 0x04000093 RID: 147
		[Tooltip("潰れ範囲最小 この間で設定されたスケール値を足す 判定はローカル位置のZ値")]
		public float CrushMoveAreaMin;

		// Token: 0x04000094 RID: 148
		[Tooltip("潰れ範囲最大 この間で設定されたスケール値を足す 判定はローカル位置のZ値")]
		public float CrushMoveAreaMax;

		// Token: 0x04000095 RID: 149
		[Tooltip("潰れた時に加算するXYスケール")]
		public float CrushAddXYMin;

		// Token: 0x04000096 RID: 150
		[Tooltip("伸びた時に加算するXYスケール")]
		public float CrushAddXYMax;
	}

	// Token: 0x0200000E RID: 14
	public class ParticlePtn
	{
		// Token: 0x06000069 RID: 105 RVA: 0x00008E7C File Offset: 0x0000707C
		public ParticlePtn()
		{
			this.Damping = 0f;
			this.Elasticity = 0f;
			this.Stiffness = 0f;
			this.Inert = 0f;
			this.Radius = 0f;
			this.IsRotationCalc = true;
			this.ScaleNextBoneLength = 1f;
			this.IsMoveLimit = false;
			this.MoveLimitMin = Vector3.zero;
			this.MoveLimitMax = Vector3.zero;
			this.KeepLengthLimitMin = 0f;
			this.KeepLengthLimitMax = 0f;
			this.IsCrush = false;
			this.CrushMoveAreaMin = 0f;
			this.CrushMoveAreaMax = 0f;
			this.CrushAddXYMin = 0f;
			this.CrushAddXYMax = 0f;
			this.EndOffset = Vector3.zero;
			this.InitLocalPosition = Vector3.zero;
			this.InitLocalRotation = Quaternion.identity;
			this.InitLocalScale = Vector3.zero;
			this.refTrans = null;
			this.LocalPosition = Vector3.zero;
		}

		// Token: 0x04000097 RID: 151
		public float Damping;

		// Token: 0x04000098 RID: 152
		public float Elasticity;

		// Token: 0x04000099 RID: 153
		public float Stiffness;

		// Token: 0x0400009A RID: 154
		public float Inert;

		// Token: 0x0400009B RID: 155
		public float Radius;

		// Token: 0x0400009C RID: 156
		public bool IsRotationCalc = true;

		// Token: 0x0400009D RID: 157
		public float ScaleNextBoneLength = 1f;

		// Token: 0x0400009E RID: 158
		public bool IsMoveLimit;

		// Token: 0x0400009F RID: 159
		public Vector3 MoveLimitMin = Vector3.zero;

		// Token: 0x040000A0 RID: 160
		public Vector3 MoveLimitMax = Vector3.zero;

		// Token: 0x040000A1 RID: 161
		public float KeepLengthLimitMin;

		// Token: 0x040000A2 RID: 162
		public float KeepLengthLimitMax;

		// Token: 0x040000A3 RID: 163
		public bool IsCrush;

		// Token: 0x040000A4 RID: 164
		public float CrushMoveAreaMin;

		// Token: 0x040000A5 RID: 165
		public float CrushMoveAreaMax;

		// Token: 0x040000A6 RID: 166
		public float CrushAddXYMin;

		// Token: 0x040000A7 RID: 167
		public float CrushAddXYMax;

		// Token: 0x040000A8 RID: 168
		public Vector3 EndOffset = Vector3.zero;

		// Token: 0x040000A9 RID: 169
		public Vector3 InitLocalPosition = Vector3.zero;

		// Token: 0x040000AA RID: 170
		public Quaternion InitLocalRotation = Quaternion.identity;

		// Token: 0x040000AB RID: 171
		public Vector3 InitLocalScale = Vector3.zero;

		// Token: 0x040000AC RID: 172
		public Transform refTrans;

		// Token: 0x040000AD RID: 173
		public Vector3 LocalPosition = Vector3.zero;
	}

	// Token: 0x0200000F RID: 15
	[Serializable]
	public class BonePtn
	{
		// Token: 0x040000AE RID: 174
		public string Name = string.Empty;

		// Token: 0x040000AF RID: 175
		[Tooltip("重力")]
		public Vector3 Gravity = Vector3.zero;

		// Token: 0x040000B0 RID: 176
		[Tooltip("最後の骨を回すために必要")]
		public Vector3 EndOffset = Vector3.zero;

		// Token: 0x040000B1 RID: 177
		[Tooltip("空気抵抗")]
		[Range(0f, 1f)]
		public float EndOffsetDamping;

		// Token: 0x040000B2 RID: 178
		[Range(0f, 1f)]
		[Tooltip("弾力(元の位置に戻ろうとする力)")]
		public float EndOffsetElasticity;

		// Token: 0x040000B3 RID: 179
		[Tooltip("硬さ(要は移動のリミット：移動制限)")]
		[Range(0f, 1f)]
		public float EndOffsetStiffness;

		// Token: 0x040000B4 RID: 180
		[Range(0f, 1f)]
		[Tooltip("惰性(ルートが動いた分を加算するか 加算すると親子付されてる感じになる？)")]
		public float EndOffsetInert;

		// Token: 0x040000B5 RID: 181
		public List<global::DynamicBone_Ver02.BoneParameter> Params = new List<global::DynamicBone_Ver02.BoneParameter>();

		// Token: 0x040000B6 RID: 182
		public List<global::DynamicBone_Ver02.ParticlePtn> ParticlePtns = new List<global::DynamicBone_Ver02.ParticlePtn>();
	}

	// Token: 0x02000010 RID: 16
	public class Particle
	{
		// Token: 0x040000B7 RID: 183
		public Transform Transform;

		// Token: 0x040000B8 RID: 184
		public int ParentIndex = -1;

		// Token: 0x040000B9 RID: 185
		public float Damping;

		// Token: 0x040000BA RID: 186
		public float Elasticity;

		// Token: 0x040000BB RID: 187
		public float Stiffness;

		// Token: 0x040000BC RID: 188
		public float Inert;

		// Token: 0x040000BD RID: 189
		public float Radius;

		// Token: 0x040000BE RID: 190
		public bool IsRotationCalc = true;

		// Token: 0x040000BF RID: 191
		public float ScaleNextBoneLength = 1f;

		// Token: 0x040000C0 RID: 192
		public bool IsMoveLimit;

		// Token: 0x040000C1 RID: 193
		public Vector3 MoveLimitMin = Vector3.zero;

		// Token: 0x040000C2 RID: 194
		public Vector3 MoveLimitMax = Vector3.zero;

		// Token: 0x040000C3 RID: 195
		public float KeepLengthLimitMin;

		// Token: 0x040000C4 RID: 196
		public float KeepLengthLimitMax;

		// Token: 0x040000C5 RID: 197
		public bool IsCrush;

		// Token: 0x040000C6 RID: 198
		public float CrushMoveAreaMin;

		// Token: 0x040000C7 RID: 199
		public float CrushMoveAreaMax;

		// Token: 0x040000C8 RID: 200
		public float CrushAddXYMin;

		// Token: 0x040000C9 RID: 201
		public float CrushAddXYMax;

		// Token: 0x040000CA RID: 202
		public Vector3 Position = Vector3.zero;

		// Token: 0x040000CB RID: 203
		public Vector3 PrevPosition = Vector3.zero;

		// Token: 0x040000CC RID: 204
		public Vector3 EndOffset = Vector3.zero;

		// Token: 0x040000CD RID: 205
		public Vector3 InitLocalPosition = Vector3.zero;

		// Token: 0x040000CE RID: 206
		public Quaternion InitLocalRotation = Quaternion.identity;

		// Token: 0x040000CF RID: 207
		public Vector3 InitLocalScale = Vector3.zero;

		// Token: 0x040000D0 RID: 208
		public Transform refTrans;

		// Token: 0x040000D1 RID: 209
		public Vector3 LocalPosition = Vector3.zero;
	}

	// Token: 0x02000011 RID: 17
	public class LoadInfo
	{
		// Token: 0x040000D2 RID: 210
		public string Comment;

		// Token: 0x040000D3 RID: 211
		public float ReflectSpeed;

		// Token: 0x040000D4 RID: 212
		public int HeavyLoopMaxCount;

		// Token: 0x040000D5 RID: 213
		public List<global::DynamicBoneCollider> Colliders = new List<global::DynamicBoneCollider>();

		// Token: 0x040000D6 RID: 214
		public List<Transform> Bones = new List<Transform>();

		// Token: 0x040000D7 RID: 215
		public List<global::DynamicBone_Ver02.BonePtn> Patterns = new List<global::DynamicBone_Ver02.BonePtn>();
	}

	// Token: 0x02000012 RID: 18
	public class TransformParam
	{
		// Token: 0x040000D8 RID: 216
		public Vector3 pos;

		// Token: 0x040000D9 RID: 217
		public Quaternion rot;

		// Token: 0x040000DA RID: 218
		public Vector3 scale;
	}
}
